﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Simple.Repository.Models
{
    /// <summary>
    /// 班级动态表
    /// </summary>
    public class ClassDynamic : BusinessFullEntityBase<Guid>
    {

        /// <summary>
        /// 动态内容
        /// </summary>
        public string Content { get; set; } = "";

        /// <summary>
        /// 班级Id集合
        /// </summary>
        public string ClassIds { get; set; } = "";

        /// <summary>
        /// 状态0-草稿，1已发布,2已屏蔽
        /// </summary>
        public int State { get; set; } = 1;

        /// <summary>
        /// 发布人姓名
        /// </summary>
        public string CreateUserName { get; set; } = "";

        /// <summary>
        /// 家长或老师标识
        /// </summary>
        public int? LoginType { get; set; }

        /// <summary>
        /// 家属关系
        /// </summary>
        public int? Relationship { get; set; }

        /// <summary>
        /// 关联幼儿Id
        /// </summary>
        public Guid? RelationshipChildrenId { get; set; }

        /// <summary>
        /// 留言列表
        /// </summary>
        public List<ClassDynamicLeaveMessage>? LeaveMessages = null;

        /// <summary>
        /// 班级信息
        /// </summary>
        public List<ClassDynamicImage>? Images = null;

        /// <summary>
        /// 点赞信息
        /// </summary>
        public List<DynamicLike>? DynamicLikes = null;

        public override void ConfigureEntity(ModelBuilder builder)
        {
            builder.Entity<ClassDynamic>(entity =>
            {
                entity.ToTable("Class_Dynamic");
            });
        }
    }
}
